﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using CellphoneRepair.Entities;
using DevExpress.XtraEditors;

namespace CellphoneRepair.UserControls
{
    public partial class Uc_list_base : DevExpress.XtraEditors.XtraUserControl
    {
        public Uc_list_base()
        {
            InitializeComponent();
        }

        internal EnumEditType editType { get; set; }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            editType = EnumEditType.Create;
            gridView1.AddNewRow();
            gridView1.ShowEditForm();
        }

        private void gridView1_InitNewRow(object sender, DevExpress.XtraGrid.Views.Grid.InitNewRowEventArgs e)
        {
            
        }

        private void simpleButton2_Click(object sender, EventArgs e)
        {
            editType = EnumEditType.Edit;
            gridView1.ShowEditForm();
        }

        internal virtual void simpleButton3_Click(object sender, EventArgs e)
        {
            
        }

        internal virtual void gridView1_RowUpdated(object sender, DevExpress.XtraGrid.Views.Base.RowObjectEventArgs e)
        {

        }
    }
}
